import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import singleSpaVue from 'single-spa-vue'
Vue.config.productionTip = false

const appOptions = {
        el: '#vue',
        router,
        store,
        render: h => h(App)
    }
    // appOptions名字固定的
const vueLifecycles = singleSpaVue({
        Vue,
        appOptions
    })
    //协议接入
    //将子应用打包成类库 lib
export const bootstrap = vueLifecycles.bootstrap;
export const mount = vueLifecycles.mount;
export const unmount = vueLifecycles.unmount;


console.log(vueLifecycles);
//window.singleSpaNavigate如果是父应用就使用'http://192.168.0.108:8081/'
if (window.singleSpaNavigate) {
    __webpack_public_path__ = 'http://192.168.0.108:8081/'
}
if (!window.singleSpaNavigate) {
    delete appOptions.el
        // new Vue(appOptions)
    new Vue(appOptions).$mount('#app')
}



//npm install single-spa-vue安装插件